package cn.edu.zafu.bigdata.psy;

interface Movable {
    void move();
    void stop();
}
interface Resizable {
    void resize(double factor);
}
class Cars implements Movable {
    @Override
    public void move() {
        System.out.println("The car is moving.");
    }

    @Override
    public void stop() {
        System.out.println("The car has stopped.");
    }
}
class ResizableCircle implements Movable, Resizable {
    private double radius;

    public ResizableCircle(double radius) {
        this.radius = radius;
    }

    @Override
    public void move() {
        System.out.println("The circle is moving.");
    }

    @Override
    public void stop() {
        System.out.println("The circle has stopped.");
    }

    @Override
    public void resize(double factor) {
        radius *= factor;
        System.out.println("Resized circle radius: " + radius);
    }
}
class TestInterface {
    public static void main(String[] args) {
        Cars car = new Cars();
        car.move();
        car.stop();

        ResizableCircle circle = new ResizableCircle(5);
        circle.move();
        circle.stop();
        circle.resize(2);
    }
}